{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append(r'D:\\codeproject\\data-process')\n",
    "from tqdm.notebook import tqdm\n",
    "import random\n",
    "# 确保 pandas 的 apply 方法可以与 tqdm 一起使用\n",
    "import glob\n",
    "import os\n",
    "import pandas as pd\n",
    "tqdm.pandas()\n",
    "import numpy as np\n",
    "import re\n",
    "from datetime import datetime, timedelta\n",
    "from data_deal.function import get_stage_hr, get_stage_rr,rpe_get\n",
    "from data_deal.merger import ecg_deal, singlework_deal,rrdata_deal,rri_deal,singledetail_deal,long_term_ecg_deal\n",
    "# 定义源路径和目标路径\n",
    "long_term_path = r'D:\\学习&科研\\华为手表项目\\华为数据\\long_term'\n",
    "long_term_deal_path = r'D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path\n",
    "import shutil\n",
    "#\n",
    " #先将所有人的数据转换为csv格式，该复制的数据也复制到文件夹\n",
    "def copy_all_files_and_folders(source_path, target_path):\n",
    "    \"\"\"\n",
    "    递归复制源路径下的所有文件和文件夹到目标路径\n",
    "    \"\"\"\n",
    "    for root, dirs, files in os.walk(source_path):\n",
    "        # 构建目标路径下对应的当前文件夹路径\n",
    "        relative_path = os.path.relpath(root, source_path)\n",
    "        target_root = os.path.join(target_path, relative_path)\n",
    "\n",
    "        # 确保目标文件夹存在，如果不存在则创建\n",
    "        os.makedirs(target_root, exist_ok=True)\n",
    "\n",
    "        # 复制当前文件夹下的所有文件\n",
    "        for file in files:\n",
    "            source_file = os.path.join(root, file)\n",
    "            target_file = os.path.join(target_root, file)\n",
    "            shutil.copy2(source_file, target_file)\n",
    "\n",
    "        # 复制当前文件夹下的所有子文件夹（使用copytree并处理已存在情况）\n",
    "        for dir_name in dirs:\n",
    "            source_dir = os.path.join(root, dir_name)\n",
    "            target_dir = os.path.join(target_root, dir_name)\n",
    "            try:\n",
    "                shutil.copytree(source_dir, target_dir)\n",
    "            except FileExistsError:\n",
    "                # 如果目标文件夹已存在，可选择跳过或者进一步处理（比如合并内容等），这里选择跳过\n",
    "                continue\n",
    "\n",
    "\n",
    "# 使用示例\n",
    "\n",
    "copy_all_files_and_folders(long_term_path, long_term_deal_path)\n",
    "    \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "9714313585ab4712b533c7423db98422",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Processing files:   0%|          | 0/6495 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import os\n",
    "import multiprocessing\n",
    "import concurrent.futures\n",
    "\n",
    "# 获取 CPU 核心数，这里取一个相对合理的倍数（示例为核心数 * 2）来设置线程数量\n",
    "num_threads = multiprocessing.cpu_count() * 4\n",
    "\n",
    "# 用于统计所有待处理文件的数量\n",
    "total_files_count = 0\n",
    "for root, dirs, files in os.walk(long_term_deal_path):\n",
    "    total_files_count += len(files)\n",
    "\n",
    "# 使用 os.walk 递归遍历目录树，并结合 tqdm 显示进度\n",
    "with tqdm(total=total_files_count, desc=\"Processing files\") as pbar:\n",
    "    file_paths = []\n",
    "    for root, dirs, files in os.walk(long_term_deal_path):\n",
    "        for file in files:\n",
    "            file_path = os.path.join(root, file)\n",
    "            file_paths.append(file_path)\n",
    "\n",
    "    def process_file(file_path):\n",
    "        \"\"\"\n",
    "        处理单个文件的函数\n",
    "        \"\"\"\n",
    "        file_name = os.path.basename(file_path)\n",
    "        if 'ecg' in file_name:\n",
    "            long_term_ecg_deal(file_path).to_csv(file_path,index=False)\n",
    "            \n",
    "            \n",
    "        if 'rrdata' in file_name:\n",
    "            rrdata_deal(file_path).to_csv(file_path,index=False)\n",
    "        if 'singleworkoutdetail' in file_name and file_path.endswith('.txt'):\n",
    "            base, ext = os.path.splitext(file_path)\n",
    "            new_file = base + '.csv'\n",
    "            singledetail_deal(file_path).to_csv(new_file,index=False)\n",
    "            os.remove(file_path)\n",
    "        if 'singleworkout' in file_name and file_path.endswith('.txt'):\n",
    "            base, ext = os.path.splitext(file_path)\n",
    "            new_file = base + '.csv'\n",
    "            singlework_deal(file_path).to_csv(new_file,index=False)\n",
    "            os.remove(file_path)\n",
    "        if 'rri' in file_name and file_path.endswith('.txt'):\n",
    "            base, ext = os.path.splitext(file_path)\n",
    "            new_file = base + '.csv'\n",
    "            rri_deal(file_path).to_csv(new_fileindex=False)\n",
    "            os.remove(file_path)\n",
    "        pbar.update(1)\n",
    "\n",
    "    with concurrent.futures.ThreadPoolExecutor(max_workers=num_threads) as executor:\n",
    "        # 提交文件处理任务到线程池\n",
    "        futures = [executor.submit(process_file, file_path) for file_path in file_paths]\n",
    "        # 等待所有任务完成\n",
    "        concurrent.futures.wait(futures)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1001 最小时间 2024-10-09 11:15:40\n",
      "1002 最小时间 2024-10-21 08:33:23\n",
      "1007 最小时间 2024-11-05 23:02:57\n",
      "1008 最小时间 2024-09-09 08:23:26\n",
      "1009 最小时间 2024-10-23 06:45:41\n",
      "1010 最小时间 2024-10-11 07:21:45\n",
      "1013 最小时间 2024-10-15 09:33:56\n",
      "1016 最小时间 2024-09-09 09:04:29\n",
      "1018 最小时间 2024-10-10 07:09:25\n",
      "1025 最小时间 2024-10-23 07:05:01\n",
      "1054 最小时间 2024-10-20 20:53:34\n",
      "1073 最小时间 2024-09-09 05:55:22\n",
      "1077 最小时间 2024-09-09 07:13:49\n",
      "1078 最小时间 2024-09-20 06:20:02\n",
      "1081 最小时间 2024-09-17 10:59:15\n",
      "1089 最小时间 2024-10-03 10:05:10\n",
      "1094 最小时间 2024-10-12 06:05:57\n",
      "1104 最小时间 2024-11-15 07:38:16\n",
      "1105 最小时间 2024-10-01 09:39:08\n",
      "1110 最小时间 2024-11-05 11:49:00\n",
      "1111 最小时间 2024-11-22 06:18:28\n",
      "1112 最小时间 2024-11-22 08:01:47\n",
      "1116 最小时间 2024-11-15 09:18:59\n",
      "1117 最小时间 2024-11-22 08:23:53\n",
      "1120 最小时间 2024-10-12 06:09:51\n",
      "1121 最小时间 2024-11-22 09:33:43\n",
      "1122 最小时间 2024-11-02 09:40:39\n",
      "1123 最小时间 2024-11-15 09:18:38\n",
      "1133 最小时间 2024-11-24 20:58:00\n",
      "1137 最小时间 2024-11-22 09:21:24\n",
      "1134 最小时间 2024-11-22 10:49:53\n"
     ]
    }
   ],
   "source": [
    "#先拷贝一份处理完成的数据\n",
    "\n",
    "#！！！！！！！！！！！！！！！！！！！！！！！！！！\n",
    "#修改rrdata时间文件名\n",
    "long_term_user=pd.read_csv(r'D:\\学习&科研\\华为手表项目\\华为数据\\base-data\\gluser.csv')\n",
    "\n",
    "\n",
    "\n",
    "for index, row in long_term_user.iterrows():\n",
    "    id=row['id']\n",
    "# # for i in [1001,1002,1008,1009,1010,1013,1016,1018,1054,1073,1077,1078,1081,1094,1105,1120]:\n",
    "# for i in [1001,1002]:\n",
    "#     id=i\n",
    "    data_path=os.path.join(long_term_deal_path,'polar',str(id),'data')\n",
    "    rrdata_path=os.path.join(long_term_deal_path,'polar',str(id),'rrdata')\n",
    "    healthtest_path=os.path.join(long_term_deal_path,'healthtest')\n",
    "    singlework_path=os.path.join(long_term_deal_path,'singlework',str(id)+'_singleworkout.csv')\n",
    "   \n",
    "   \n",
    "   \n",
    "    healthtest = pd.read_csv(glob.glob(os.path.join(healthtest_path, f'*{id}*'))[0])\n",
    "    singlework=pd.read_csv(singlework_path)\n",
    "    \n",
    "    rrdata_merged_df=pd.DataFrame()\n",
    "    #将所有polar数据合并，循环读取data_path中所有的csv并合并和一个df\n",
    "    for root, dirs, files in os.walk(rrdata_path):\n",
    "        for file in files:\n",
    "            file_path = os.path.join(root, file)\n",
    "            \n",
    "            if file_path.endswith('.csv'):\n",
    "                try:\n",
    "                    # 读取单个csv文件为DataFrame\n",
    "                    df = pd.read_csv(file_path,low_memory=False)\n",
    "                    # 将读取到的DataFrame合并到merged_df中\n",
    "                    rrdata_merged_df = pd.concat([rrdata_merged_df, df], ignore_index=True)\n",
    "                    rrdata_merged_df.sort_values(by='timestamp', ascending=True)\n",
    "                    if os.path.getsize(file_path) < 2048:\n",
    "                        os.remove(file_path)\n",
    "                except Exception as e:\n",
    "                    # print(f\"读取文件xxxx {file_path} 时出现错误: {str(e)}\")\n",
    "                    pass\n",
    "                \n",
    "    # 循环输出singlework\n",
    "    for index, row in singlework.iterrows():\n",
    "        starttime= pd.to_datetime(row['活动.测量开始时间']).tz_localize('Asia/Shanghai').timestamp() * 1000\n",
    "        endtime= pd.to_datetime(row['活动.测量结束时间']).tz_localize('Asia/Shanghai').timestamp() * 1000\n",
    "        half_hour_ns = 1800000\n",
    "        select_df=rrdata_merged_df[(rrdata_merged_df['timestamp']>=starttime-half_hour_ns) & (rrdata_merged_df['timestamp']<=endtime+half_hour_ns)]\n",
    "        # print(select_df.shape)\n",
    "        #将df保存为csv\n",
    "        if select_df.shape[0]>=1:\n",
    "            select_df.to_csv(os.path.join(rrdata_path,str(index)+'selectrun.csv'),index=False)\n",
    "    #循环输出healthtest\n",
    "    for index, row in healthtest.iterrows():\n",
    "        starttime= row['timestamp']*1000\n",
    "        endtime= row['timestamp']*1000\n",
    "        half_hour_ns = 1800000\n",
    "        select_df=rrdata_merged_df[(rrdata_merged_df['timestamp']>=starttime-half_hour_ns) & (rrdata_merged_df['timestamp']<=endtime+half_hour_ns)]\n",
    "        # print(select_df.shape)\n",
    "        select_df.to_csv(os.path.join(rrdata_path,str(index)+'selectresting.csv'),index=False)\n",
    "\n",
    "\n",
    "    file_list = pd.DataFrame(columns=['filename'])\n",
    "    for root, dirs, files in os.walk(rrdata_path):\n",
    "        for file in files:\n",
    "            if'select' in file:\n",
    "                # 将符合条件的文件名添加到file_list的DataFrame中\n",
    "                file_list = pd.concat([file_list, pd.DataFrame({'filename': [os.path.join(rrdata_path,file)]})], ignore_index=True)\n",
    "\n",
    "    def extract_date(row):\n",
    "  \n",
    "        file_path = os.path.join(rrdata_path, row['filename'])\n",
    "        try:\n",
    "            df_file = pd.read_csv(file_path)\n",
    "            date = df_file.iloc[0]['timestamp']/1000\n",
    "            dt_object = datetime.fromtimestamp(date)\n",
    "# 可以按照你想要的格式输出日期时间，比如常见的年-月-日 时:分:秒格式\n",
    "            formatted_date = dt_object.strftime('%Y-%m-%d %H:%M:%S')\n",
    "            datetimex=datetime.strptime(formatted_date, '%Y-%m-%d %H:%M:%S')\n",
    "            return datetimex\n",
    "        except Exception as e:\n",
    "            # print(f\"读取文件 {file_path} 时出现错误: {str(e)}\")\n",
    "            pass\n",
    "            # os.remove(file_path)\n",
    "            \n",
    "            return None\n",
    "\n",
    "\n",
    "    # 假设前面已经按照之前的代码构建好了file_list DataFrame，这里仅示意后续操作\n",
    "    file_list['datetime'] = file_list.apply(extract_date, axis=1)\n",
    "    #删除datetime为None的行\n",
    "    file_list=file_list[file_list['datetime'].notnull()]\n",
    "\n",
    "    #以最小的一天为开始,后面依次加一天\n",
    "    def get_day(dt, base_date):\n",
    "        # 以凌晨5点为一天的起点\n",
    "        day_start = datetime(dt.year, dt.month, dt.day, 5, 0, 0)\n",
    "        \n",
    "        if dt < day_start:\n",
    "            day_start -= timedelta(days=1)\n",
    "        return int((day_start - base_date).days + 1)\n",
    "\n",
    "    \n",
    "    try:\n",
    "        \n",
    "\n",
    "        # 假设 file_list 是一个 DataFrame\n",
    "        min_datetime = file_list['datetime'].dropna().min()\n",
    "        \n",
    "        \n",
    "       \n",
    "    except:\n",
    "        from datetime import datetime\n",
    "\n",
    "# 获取当前时间的 datetime 对象\n",
    "        current_datetime = datetime.now()\n",
    "\n",
    "        # 格式化为 YYYY-MM-DD HH:MM:SS 字符串\n",
    "        formatted_current_datetime = current_datetime.strftime('%Y-%m-%d %H:%M:%S')\n",
    "        min_datetime=formatted_current_datetime\n",
    "\n",
    "    print(id,'最小时间',min_datetime)\n",
    "    base_date = datetime(min_datetime.year, min_datetime.month, min_datetime.day, 5, 0, 0)\n",
    "    if min_datetime < base_date:\n",
    "        base_date -= timedelta(days=1)\n",
    "    # print('时间类型',file_list['datetime'].dtype)\n",
    "    # 应用 get_day 函数\n",
    "    file_list['day'] = file_list['datetime'].apply(lambda dt: get_day(dt, base_date))\n",
    "    \n",
    "\n",
    "    \n",
    "    file_list=file_list.sort_values(by='datetime')\n",
    "    file_list['state'] = file_list['filename'].apply(lambda x: 'running' if 'run' in x else 'resting')\n",
    "    # file_list.loc[(file_list['state']!= 'running') & file_list.index.isin(file_list.groupby('day').head(1).index), 'state'] ='morning'\n",
    "    # file_list.loc[(file_list['state']!= 'running') & file_list.index.isin(file_list.groupby('day').tail(1).index), 'state'] ='evening'\n",
    "\n",
    "# 定义一个函数，用于判断时间更靠近凌晨5点还是24点（这里用23:59:59近似表示）\n",
    "    def judge_time(row):\n",
    "\n",
    "        if 'run' in row['filename']:\n",
    "            return 'running'\n",
    "        else:\n",
    "            given_datetime = row['datetime']\n",
    "            target_datetime1 = pd.Timestamp(given_datetime.year, given_datetime.month, given_datetime.day, 10, 0, 0)\n",
    "            target_datetime2 = pd.Timestamp(given_datetime.year, given_datetime.month, given_datetime.day, 1, 0, 0)\n",
    "            target_datetime3 = pd.Timestamp(given_datetime.year, given_datetime.month, given_datetime.day, 23, 0, 0)\n",
    "            time_diff1 = np.abs((given_datetime - target_datetime1).total_seconds())\n",
    "\n",
    "    # 计算与当天23点的时间差绝对值\n",
    "            time_diff2 = min(np.abs((given_datetime - target_datetime2).total_seconds()), np.abs((given_datetime - target_datetime3).total_seconds()))\n",
    "            \n",
    "            return  'morning' if time_diff1 < time_diff2  else 'evening'\n",
    "\n",
    "    file_list['state'] = file_list.apply(judge_time,axis=1)\n",
    "    file_list['savefile']=file_list.apply(lambda x: str(id)+'-'+str(x['day'])+'-'+str(x['state'])+str(random.randint(1000, 9999)),axis=1)\n",
    "    \n",
    "    for index, row in file_list.iterrows():\n",
    "        old_filename = os.path.join(rrdata_path, row['filename'])\n",
    "        new_filename = os.path.join(rrdata_path, row['savefile']+'.csv')\n",
    "        os.rename(old_filename, new_filename)\n",
    "\n",
    "    [os.remove(os.path.join(rrdata_path, file)) for file in os.listdir(rrdata_path)\n",
    "     if os.path.isfile(os.path.join(rrdata_path, file))\n",
    "     and file.endswith('rrdata.csv') ]\n",
    "    \n",
    "\n",
    "  \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1001\\data\\1selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1001\\data\\43selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1001\\data\\44selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1001\\data\\47selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1001\\data\\7selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1001 最小时间 2024-10-09 11:15:41\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1002\\data\\13selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1002\\data\\21selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1002\\data\\29selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1002\\data\\30selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1002\\data\\42selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1002\\data\\47selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1002 最小时间 2024-10-21 08:33:24\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\0selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\18selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\2selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\3selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\42selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\43selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\44selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\45selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\46selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\47selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\48selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\49selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\4selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\50selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\51selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\52selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\53selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\5selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\6selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\7selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\8selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1007\\data\\9selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1007 最小时间 2024-11-05 23:02:57\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1008\\data\\10selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1008\\data\\19selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1008\\data\\29selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1008\\data\\2selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1008\\data\\3selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1008 最小时间 2024-09-09 08:23:26\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\0selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\0selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\15selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\1selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\2selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\40selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\46selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\48selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1009\\data\\53selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1009 最小时间 2024-10-23 06:45:41\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\13selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\14selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\15selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\16selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\17selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\18selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\19selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\20selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\21selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\22selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\23selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\24selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\25selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\33selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\37selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\38selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\40selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\41selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\42selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\43selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\44selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\62selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\6selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\70selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\71selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\72selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1010\\data\\73selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1010 最小时间 2024-10-11 07:21:45\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1013\\data\\10selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1013\\data\\11selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1013 最小时间 2024-10-15 09:33:57\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1016\\data\\24selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1016 最小时间 2024-09-09 09:04:30\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1018\\data\\1selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1018\\data\\27selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1018 最小时间 2024-10-10 07:09:25\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1025\\data\\15selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1025\\data\\36selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1025 最小时间 2024-10-23 07:05:00\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1054\\data\\18selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1054\\data\\23selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1054 最小时间 2024-10-20 20:53:34\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\10selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\11selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\11selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\19selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\22selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\23selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\24selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\25selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\26selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\27selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\28selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\29selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\30selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\31selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\32selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\33selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\34selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\35selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\36selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\37selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\38selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\39selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\3selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\40selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\41selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\42selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\43selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\44selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\45selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\46selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\47selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\48selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\49selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\4selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\50selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\51selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\52selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\53selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\54selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\55selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\56selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\57selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\58selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\5selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\6selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\7selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\7selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\8selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1073\\data\\9selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1073 最小时间 2024-09-09 05:55:23\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1077\\data\\0selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1077\\data\\1selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1077\\data\\2selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1077\\data\\3selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1077\\data\\4selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1077 最小时间 2024-09-09 07:13:50\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\31selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\32selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\33selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\34selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\35selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\53selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1078\\data\\7selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1078 最小时间 2024-09-20 06:20:02\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1081\\data\\0selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1081\\data\\19selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1081\\data\\35selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1081 最小时间 2024-09-17 10:59:16\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1089\\data\\28selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1089 最小时间 2024-10-03 10:05:11\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1094\\data\\0selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1094\\data\\1selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1094 最小时间 2024-10-12 06:05:57\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1104\\data\\8selectrun.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1104 最小时间 2024-11-15 07:38:16\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1105 最小时间 2024-10-01 09:39:08\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1110\\data\\16selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1110\\data\\30selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1110\\data\\32selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1110\\data\\33selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1110\\data\\34selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1110\\data\\36selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1110 最小时间 2024-11-05 11:49:00\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1111 最小时间 2024-11-22 06:18:28\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1112\\data\\32selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1112 最小时间 2024-11-22 08:01:47\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1116 最小时间 2024-11-15 09:18:59\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1117 最小时间 2024-11-22 08:23:54\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1120\\data\\1selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1120 最小时间 2024-10-12 06:09:52\n",
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1121\\data\\10selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1121\\data\\22selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1121 最小时间 2024-11-22 09:33:44\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1122 最小时间 2024-11-02 09:40:40\n",
      "1123 最小时间 2024-11-15 09:18:38\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1133 最小时间 2024-11-24 20:58:00\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1137\\data\\3selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1137\\data\\43selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "读取文件 D:\\学习&科研\\华为手表项目\\华为数据\\long_term_deal\\polar\\1137\\data\\7selectresting.csv 时出现错误: single positional indexer is out-of-bounds\n",
      "1137 最小时间 2024-11-22 09:21:24\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n",
      "C:\\Users\\崔伟\\AppData\\Local\\Temp\\ipykernel_3260\\1964700347.py:75: DtypeWarning: Columns (2) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  df_file = pd.read_csv(file_path)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1134 最小时间 2024-11-22 10:49:53\n"
     ]
    }
   ],
   "source": [
    "#修改ecgdata\n",
    "\n",
    "#重新构建代码逻辑\n",
    "#将所有的polar ecg和  rr的数据合并，然后按照healthtest 和singlework中的记录，找到对应的ecg和rr，然后储存为csv，命名规则\n",
    "#是work中为running，然后再到该阶段去找不同的阶段，health中先储存然后再将排序，早的mor晚的evening\n",
    "\n",
    "long_term_user=pd.read_csv(r'D:\\学习&科研\\华为手表项目\\华为数据\\base-data\\gluser.csv')\n",
    "\n",
    "\n",
    "\n",
    "for index, row in long_term_user.iterrows():\n",
    "    id=row['id']\n",
    "# for i in [1001,1002]:\n",
    "#     id=i\n",
    "    rrdata_path=os.path.join(long_term_deal_path,'polar',str(id),'data')\n",
    "    # rrdata_path=os.path.join(long_term_deal_path,'polar',str(id),'rrdata')\n",
    "    healthtest_path=os.path.join(long_term_deal_path,'healthtest')\n",
    "    singlework_path=os.path.join(long_term_deal_path,'singlework',str(id)+'_singleworkout.csv')\n",
    "   \n",
    "   \n",
    "   \n",
    "    healthtest = pd.read_csv(glob.glob(os.path.join(healthtest_path, f'*{id}*'))[0])\n",
    "    singlework=pd.read_csv(singlework_path)\n",
    "    \n",
    "    rrdata_merged_df=pd.DataFrame()\n",
    "    #将所有polar数据合并，循环读取data_path中所有的csv并合并和一个df\n",
    "    for root, dirs, files in os.walk(rrdata_path):\n",
    "        for file in files:\n",
    "            file_path = os.path.join(root, file)\n",
    "            \n",
    "            if file_path.endswith('.csv'):\n",
    "                try:\n",
    "                    # 读取单个csv文件为DataFrame\n",
    "                    df = pd.read_csv(file_path,low_memory=False)\n",
    "                    # 将读取到的DataFrame合并到merged_df中\n",
    "                    rrdata_merged_df = pd.concat([rrdata_merged_df, df], ignore_index=True)\n",
    "                    rrdata_merged_df['ecg_timestamp']=rrdata_merged_df['ecg_timestamp'].astype('int64')\n",
    "                    rrdata_merged_df.sort_values(by='ecg_timestamp', ascending=True)\n",
    "                    if os.path.getsize(file_path) < 2048:\n",
    "                        os.remove(file_path)\n",
    "                except Exception as e:\n",
    "                    print(f\"读取文件xxxx {file_path} 时出现错误: {str(e)}\")\n",
    "            \n",
    "    # 循环输出singlework\n",
    "    # print(rrdata_merged_df['ecg_timestamp'].detype)\n",
    "    for index, row in singlework.iterrows():\n",
    "        starttime= pd.to_datetime(row['活动.测量开始时间']).tz_localize('Asia/Shanghai').timestamp() * 1000\n",
    "        endtime= pd.to_datetime(row['活动.测量结束时间']).tz_localize('Asia/Shanghai').timestamp() * 1000\n",
    "        half_hour_ns = 1800000\n",
    "        select_df=rrdata_merged_df[(rrdata_merged_df['ecg_timestamp']>=starttime-half_hour_ns) & (rrdata_merged_df['ecg_timestamp']<=endtime+half_hour_ns)]\n",
    "        # print(select_df.shape)\n",
    "        #将df保存为csv\n",
    "        select_df.to_csv(os.path.join(rrdata_path,str(index)+'selectrun.csv'),index=False)\n",
    "    #循环输出healthtest\n",
    "    for index, row in healthtest.iterrows():\n",
    "        starttime= row['timestamp']*1000\n",
    "        endtime= row['timestamp']*1000\n",
    "        half_hour_ns = 1800000\n",
    "        select_df=rrdata_merged_df[(rrdata_merged_df['ecg_timestamp']>=starttime-half_hour_ns) & (rrdata_merged_df['ecg_timestamp']<=endtime+half_hour_ns)]\n",
    "        # print(select_df.shape)\n",
    "        select_df.to_csv(os.path.join(rrdata_path,str(index)+'selectresting.csv'),index=False)\n",
    "\n",
    "\n",
    "    file_list = pd.DataFrame(columns=['filename'])\n",
    "    for root, dirs, files in os.walk(rrdata_path):\n",
    "        for file in files:\n",
    "            if'select' in file:\n",
    "                # 将符合条件的文件名添加到file_list的DataFrame中\n",
    "                file_list = pd.concat([file_list, pd.DataFrame({'filename': [os.path.join(rrdata_path,file)]})], ignore_index=True)\n",
    "\n",
    "    def extract_date(row):\n",
    "  \n",
    "        file_path = os.path.join(rrdata_path, row['filename'])\n",
    "        try:\n",
    "            df_file = pd.read_csv(file_path)\n",
    "            date = df_file.iloc[0]['ecg_timestamp']/1000\n",
    "            dt_object = datetime.fromtimestamp(date)\n",
    "# 可以按照你想要的格式输出日期时间，比如常见的年-月-日 时:分:秒格式\n",
    "            formatted_date = dt_object.strftime('%Y-%m-%d %H:%M:%S')\n",
    "            datetimex=datetime.strptime(formatted_date, '%Y-%m-%d %H:%M:%S')\n",
    "            return datetimex\n",
    "        except Exception as e:\n",
    "            print(f\"读取文件 {file_path} 时出现错误: {str(e)}\")\n",
    "            # os.remove(file_path)\n",
    "            \n",
    "            return None\n",
    "\n",
    "\n",
    "    # 假设前面已经按照之前的代码构建好了file_list DataFrame，这里仅示意后续操作\n",
    "    file_list['datetime'] = file_list.apply(extract_date, axis=1)\n",
    "    #删除datetime为None的行\n",
    "    file_list=file_list[file_list['datetime'].notnull()]\n",
    "\n",
    "    #以最小的一天为开始,后面依次加一天\n",
    "    def get_day(dt, base_date):\n",
    "        # 以凌晨5点为一天的起点\n",
    "        day_start = datetime(dt.year, dt.month, dt.day, 5, 0, 0)\n",
    "        \n",
    "        if dt < day_start:\n",
    "            day_start -= timedelta(days=1)\n",
    "        return int((day_start - base_date).days + 1)\n",
    "    try:\n",
    "        \n",
    "\n",
    "        # 假设 file_list 是一个 DataFrame\n",
    "        min_datetime = file_list['datetime'].dropna().min()\n",
    "        \n",
    "        \n",
    "       \n",
    "    except:\n",
    "        from datetime import datetime\n",
    "\n",
    "# 获取当前时间的 datetime 对象\n",
    "        current_datetime = datetime.now()\n",
    "\n",
    "        # 格式化为 YYYY-MM-DD HH:MM:SS 字符串\n",
    "        formatted_current_datetime = current_datetime.strftime('%Y-%m-%d %H:%M:%S')\n",
    "        min_datetime=formatted_current_datetime\n",
    "\n",
    "    print(id,'最小时间',min_datetime)\n",
    "    \n",
    "    base_date = datetime(min_datetime.year, min_datetime.month, min_datetime.day, 5, 0, 0)\n",
    "    if min_datetime < base_date:\n",
    "        base_date -= timedelta(days=1)\n",
    "    # print('时间类型',file_list['datetime'].dtype)\n",
    "    # 应用 get_day 函数\n",
    "    file_list['day'] = file_list['datetime'].apply(lambda dt: get_day(dt, base_date))\n",
    "    \n",
    "\n",
    "    \n",
    "    file_list=file_list.sort_values(by='datetime')\n",
    "    file_list['state'] = file_list['filename'].apply(lambda x: 'running' if 'run' in x else 'resting')\n",
    "    # file_list.loc[(file_list['state']!= 'running') & file_list.index.isin(file_list.groupby('day').head(1).index), 'state'] ='morning'\n",
    "    # file_list.loc[(file_list['state']!= 'running') & file_list.index.isin(file_list.groupby('day').tail(1).index), 'state'] ='evening'\n",
    "\n",
    "# 定义一个函数，用于判断时间更靠近凌晨5点还是24点（这里用23:59:59近似表示）\n",
    "    def judge_time(row):\n",
    "\n",
    "        if 'run' in row['filename']:\n",
    "            return 'running'\n",
    "        else:\n",
    "            given_datetime = row['datetime']\n",
    "            target_datetime1 = pd.Timestamp(given_datetime.year, given_datetime.month, given_datetime.day, 10, 0, 0)\n",
    "            target_datetime2 = pd.Timestamp(given_datetime.year, given_datetime.month, given_datetime.day, 1, 0, 0)\n",
    "            target_datetime3 = pd.Timestamp(given_datetime.year, given_datetime.month, given_datetime.day, 23, 0, 0)\n",
    "            time_diff1 = np.abs((given_datetime - target_datetime1).total_seconds())\n",
    "\n",
    "    # 计算与当天23点的时间差绝对值\n",
    "            time_diff2 = min(np.abs((given_datetime - target_datetime2).total_seconds()), np.abs((given_datetime - target_datetime3).total_seconds()))\n",
    "            \n",
    "            return  'morning' if time_diff1 < time_diff2  else 'evening'\n",
    "\n",
    "    file_list['state'] = file_list.apply(judge_time,axis=1)\n",
    "    file_list['savefile']=file_list.apply(lambda x: str(id)+'-'+str(x['day'])+'-'+str(x['state'])+str(random.randint(1000, 9999)),axis=1)\n",
    "\n",
    "    for index, row in file_list.iterrows():\n",
    "        old_filename = os.path.join(rrdata_path, row['filename'])\n",
    "        new_filename = os.path.join(rrdata_path, row['savefile']+'.csv')\n",
    "        os.rename(old_filename, new_filename)\n",
    "\n",
    "    [os.remove(os.path.join(rrdata_path, file)) for file in os.listdir(rrdata_path)\n",
    "     if os.path.isfile(os.path.join(rrdata_path, file))\n",
    "     and file.endswith('秒.csv') ]\n",
    "    \n",
    "\n",
    "  \n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "MLandDL",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.20"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
